
HiddenDangerForm = Ext.extend(Ext.Window,
{
    constructor : function(a) {
        Ext.applyIf(this, a);
        this.initUIComponents();
        HiddenDangerForm .superclass.constructor.call(this, {
            layout : "fit",
            id : this.inputFormName,
            items : yearGridFormPanel,
            modal : true,
            bodyStyle : "padding:2px;",
            buttonAlign : "center",
            buttons : yearGridFormButtons,
            title : "隐患记录",
            iconCls : "menu-flowWait",
            width : 620,
            height : 450
        });
    },
    //初始化数据
    initUIComponents : function() {
        createyeargridform({
            operation:this,
            form:{
                saveUrl: __ctxPath+"/safecheckplan/saveHiddenDanger.do",
                items:[
                {
                    id : "hiddenDanger.id",
                    name : "hiddenDanger.id",
                    xtype : "hidden",
                    value : this.id == null ? "": this.id
                }, {
                    name : "hiddenDanger.hiddenDangerId",
                    xtype : "hidden",
                    id : "hiddenDanger.hiddenDangerId",
                    value : this.hiddenDangerId == null ? "" : this.hiddenDangerId
                },{
                    name : "hiddenDanger.years",
                    xtype : "hidden",
                    id : "hiddenDanger.years",
                    value : this.years == null ? "" : this.years
                },{
				layout : "column",
				//      border:false,
				bodyStyle : "padding:5px;",
				items : [
						{
							layout : "form",
							columnWidth : .5,
							border : false,
							//                        True表示为显示出面板body元素的边框，false则隐藏
							defaultType : "textfield",
							items : [ {
								fieldLabel : '隐患名称'
										+ '<font color=red>*</font>',
								id : "hiddenDanger.hiddenDangerName",
								name : "hiddenDanger.hiddenDangerName",
								maxLength : 80,
								width : 146,
								allowBlank : false,
								blankText : "隐患名称不能为空！"
							} ]
						},
						{
							layout : "form",
							columnWidth : .5,
							border : false,
							//                        True表示为显示出面板body元素的边框，false则隐藏
							defaultType : "textfield",
							items : [ {
								fieldLabel : '负责人',
								xtype : 'textfield',
								name : "hiddenDanger.leader",
								width : 146,
								
							} ]
						},
						{
							layout : "form",
							border : false,
							columnWidth : .5,
							defaultType : "textfield",
							items : [ {
								fieldLabel : "隐患等级",
								id : "hiddenDanger.dangerRank",
								name : "hiddenDanger.dangerRank",
								xtype : "combo",
								emptyText : '请选择',
								mode : "local",
								editable : false,
								width : 146,
								triggerAction : "all",
								store : [
										[ "1",  "一级" ],
										[ "2",  "二级" ],
										[ "3",	"三级" ],
										[ "4",	"四级" ]],
							} ]
						},
						{
							layout : "form",
							border : false,
							columnWidth : .5,
							items : [ {
								fieldLabel : "隐患状态",
								id : "hiddenDanger.state",
								name : "hiddenDanger.state",
								xtype : "combo",
								emptyText : '请选择',
								mode : "local",
								editable : false,
								width : 146,
								triggerAction : "all",
								store : [
										[ "1",  "已关闭" ],
										[ "2",  "待完成" ],
										],
							} ]
						},
						{
							layout : "form",
							columnWidth : .5,
							border : false,
							//                        True表示为显示出面板body元素的边框，false则隐藏
							defaultType : "textfield",
							items : [ {
								fieldLabel : "隐患类别",
								id : "hiddenDanger.dangerCategory",
								name : "hiddenDanger.dangerCategory",
								xtype : "combo",
								mode : "local",
								editable : false,
								emptyText : '请选择',
								width : 146,
								triggerAction : "all",
								store : [
										[ "1",  "人员行为" ],
										[ "2",  "文明施工" ],
										[ "3",	"环境保护" ],
										[ "4",  "临时用电" ],
										[ "5",  "防护设备" ],
										[ "6",	"防护用品" ],
										[ "7",	"起重作业" ],
										[ "8",  "模板工程" ],
										[ "9",  "办公环境" ],
										[ "10",	"消防交通" ],
										[ "11",	"其他" ]
										],
							} ]
						},
						{
						layout : "form",
						bodyStyle : "padding:5px;",
						columnWidth : 1.,
						items : [ {
							xtype : "textarea",
							fieldLabel : '危险程度',
							name : 'hiddenDanger.dangerLevel',
							/*maxLength:300,
							height:25,*/
							width : 448
						} ]
						}]
                }
				]
            },
            loadData:{
                getUrl:__ctxPath +"/safecheckplan/getHiddenDanger.do",
                preName : "hiddenDanger"
            },
            isShow : this.isShow
        });
    }
});
